﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaiGaoQiaoWeb.Models
{
    /// <summary>
    /// 劳保物品调出
    /// </summary>
    public class OutStockVM
    {
        /// <summary>
        /// ID
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 调出日期
        /// </summary>
        [DisplayName("调出日期")]
        [Required(ErrorMessage = "调出日期不能为空")]
        public string OutDt1 { get; set; }
        public DateTime OutDt { get; set; }
        /// <summary>
        /// 劳保物品id
        /// </summary>
        [DisplayName("物资名称")]
        [Range(1, 1000000, ErrorMessage = "请选择您要出库的物品")]
        public int Article_ID { get; set; }

        /// <summary>
        /// 物品编号
        /// </summary>
        [DisplayName("物资编号")]
        public string Article_NO { get; set; }

        /// <summary>
        /// 劳保物品规格
        /// </summary>
        [DisplayName("物资规格")]
        public string Article_Unit { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        [DisplayName("调出数量")]
        [Remote("ValidateCount", "OutStock", AdditionalFields = "Article_ID,Article_Unit,Count", HttpMethod = "POST", ErrorMessage = "库存不足")]
        [RegularExpression(@"^[1-9]+(.[0-9]{0,3})?$", ErrorMessage = "数量必须为正整数或小数")]
        //[Range(0,100000,ErrorMessage="数量不能为空")]
        [Required(ErrorMessage = "数量不能为空")]
        public int Count { get; set; }
        /// <summary>
        /// 操作人
        /// </summary>
        [DisplayName("操作人")]
        public string Operate { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("备注")]
        public string Remark { get; set; }
        /// <summary>
        /// 记录日期
        /// </summary>
        public DateTime RecordDateTime { get; set; }
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }


    }
}